Copyright: DPing Copyright DameWare Development 1998
Citation: DameWare Development 1998


 DPing Help Index

Properties	Methods	Events

DPing Custom Control

Description:

DameWare Ping ActiveX component is a 32-bit custom control for use with Visual Basic, Visual C++, Windows Scripting Host and Web pages or any environment that can host ActiveX controls.  DameWare Ping control will allow the developer to verify connections to a remote computer or computers.  This command is available only if the TCP/IP protocol has been installed and properly configured.

DPing can be used in two different modes - one is as a hidden control object, and the other is as an edit box window.  When used as an edit box window, the DPing component is virtually automatic, making it very easy to use within your application.  When used as a hidden control object, DPing is very flexible for the developer to configure with it’s many properties.

The DameWare Ping ActiveX control utilizes the ActiveX Template Library (ATL), which reduces dependencies on other library files.  Additional information on the ATL is available on our web site at: http://www.dameware.com/faq.htm

Registration:

How to register

What do I get when I register

License

Copyright

Installation and Support:

Installation

Technical Support

Using within a Web page


Technical Support

Technical Support is provided in any of the following ways for your convenience:

•  If possible, we prefer that you use e-mail to communicate with us. Because we check e-mail many times daily (most often via our support@dameware.com account), you can be sure we will be able to respond to you quickly.

•  Online FAQ is available at http://www.dameware.com/faq.htm.

•  Online discussion group can be viewed at http://www.dameware.com/discuss.htm.

•  You can fax us at 504-626-1189.

•  You can contact us by phone at 504-626-7545 (recommended to be used as a last resort)

DAMEWARE DEVELOPMENT

1024 Live Oak Loop

Mandeville, La.  70448


How to register
How To Order

For added convenience, you may order DPing in any of the following ways:

♦	Visit our Web Site at http://www.dameware.com/northstar.htm to order online with your Visa, MasterCard or Discover credit card, fax your order, or order by telephone:

Online at http://www.dameware.com/northstar.htm
Faxed Orders at 1-785-539-3743
Phoned Orders  calls taken 10am - 8pm, EST, Monday-Friday
     1-800-699-6395 (From the USA only)
     1-785-539-3731

Be sure to reference product number #2828 when ordering from NorthStar.

Note: Any product or support questions should be sent to support@dameware.com.  NorthStar solutions is a purchase vendor only, for DameWare Development, and unable to answer any questions about our products!

♦	For quantity pricing, please contact DameWare Development at sales@dameware.com.

♦	If you prefer to pay by check, or money order please send order information to:

DAMEWARE DEVELOPMENT

1024 Live Oak Loop

Mandeville, LA.  70448

♦	For payment by purchase order please send order information to address below, or fax to 504-626-1189:

DAMEWARE DEVELOPMENT

1024 Live Oak Loop

Mandeville, LA.  70448

Note: NorthStar Solutions does NOT accept purchase orders.


What do I get when I register
What do I get when I order

There are no limitations in this shareware release, but you may encounter a "nag" screen from time to time.  Upon receipt of your order you will receive a license file which will remove the "nag" screen. The product will be registered in your name and you will receive the latest version.  It's a small price to pay for your peace of mind. You may also wish to check on our Web Home Page for the latest version which you have rights to use as a registered user.  Our Web Home Page address is:  http://www.dameware.com.


License Agreement

DPing is not public domain or free software.

DPing is copyrighted, and all rights are reserved by DameWare Development.

Licensing:

1. shareware version

You may use the shareware version of DPing for up to 30 days in your design environment for evaluation purposes only. You may copy and distribute it freely as long as all the files in the package, including the demo programs are distributed with it and no changes or additions of any kind are made to the original package.

2. registered version

As a registered user, you can use DPing in your design environment and you have a royalty-free right to distribute executables that use DPing as a runtime component. Only registered users can distribute executables using DPing.

You may copy the software to facilitate your use of it on as many computers as there are licensed users specified in the license file. Making copies for any other purpose violates international copyright laws. In particular, you are prohibited from distributing a registered version of DPing, except as a runtime component of one of your applications.

The license file allows you to compile your applications with DPing. You are not allowed to distribute the DPing.LIC or DPing.LPK license files with any application that you distribute.  You are allowed to distribute the DPingR.LIC with your Windows Scripting Host script(s).

Disclaimer of Warranty:

THIS SOFTWARE AND THE ACCOMPANYING FILES ARE SOLD "AS IS"  WITHOUT WARRANTY OF ANY KIND EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Good data processing procedure dictates that any program be thoroughly tested with non-critical data before relying on it.

The user must assume the entire risk of using the program.

Your use of this product indicates that you have read and agreed to these terms.


Installation

DameWare DPing is distributed with a self-extracting installation wizard file - DPingW.exe.  Once executed, DPingW.exe will install the DPing components into a directory of your choosing (c:\Program Files\DameWare\DPing\ by default), and register the DPing.dll component into the Windows system registry.

The following is a list of the files installed during the installation wizard process:

DPing.DLL	32-bit ActiveX DLL Control

DPing.HLP	On-line documentation

DPing.CNT	Context file for On-line documentation

DPing.EXE	DPing VB sample executable

DPing.FRM	DPing VB sample form

DPing.VBP	DPing VB sample project file

DPing.HTM	DPing Web page sample file

DPingS.EXE	DPing Simple VB sample executable

DPingS.FRM	DPing Simple VB sample form

DPingS.VBP	DPing Simple VB sample project file

DPing.VBS	DPing Windows Scripting Host sample script

Once you have registered the DPing component, you will receive the following license files:

DPing.LIC	License file

DPing.LPK	License file for web pages

DPingR.LIC	License file for Windows Scripting Host

Distribution Note:

When you create and distribute applications that use DPing, you can install the appropriate file in the customer's Microsoft Windows \SYSTEM subdirectory, or any specific directory as long as the component is registered to that subdirectory.

Note: You are not allowed to distribute the DPing.LIC or DPing.LPK license files with any application that you distribute.  You are allowed to distribute the DPingR.LIC file with your Windows Scripting Host script(s).


Using within a Web page.
Using in a Web page

DPing Active control can easily be used in a Web Page.  The following is a simple example.  You may also wish to visit sites such as Microsoft at (http://www.microsoft.com/workshop) or DameWare Development’s home page at (http://www.dameware.com).

<HTML>

<HEAD>

<TITLE>DameWare Ping Component</TITLE>

</HEAD>

<BODY>

<p>

<object classid="clsid:5220cb21-c88d-11cf-b347-00aa00a28331"

width="0" height="0"><param name="LPKPath" value="DPing.lpk">

<embed src="DPing.lpk"></object>

</p>

<p align="center">Enter IP Address or Host Name: <input type="TEXT" value="Yahoo.com" value name="Host" size="20"> </p>

<p align="center"><input type="BUTTON" value="Ping" name="BtnPing">

<p align="center">

<object id="DPingCtl1"

type="application/x-oleobject"

classid="CLSID:DAA0D7C7-6667-11D1-9A13-00C04FD8DC2E"

codebase="DPing.dll#Version=1, 4, 0, 5"

width="360" height="140">

  <param name="UseWindow" value="1">

  <param name="ScrollBar" value="0">

</object>

</p>

<script language="VBSCRIPT">

Sub BtnPing_OnClick

'Note: IE will blow-up if you pass a empty string? so check?

If Host.Value = "" Then

MsgBox "Host name required."

Else

DPingCtl1.Ping Host.Value

End If

'	DPingCtl1.Continuous = TRUE

End Sub

</script>

</BODY>

</HTML>


Displays appropriate Copyright notices
Copyright

Copyright© 1998 DameWare Development

Portions of this product are Copyrighted (c) 1991-1998 by Microsoft Corporation.

All rights are reserved. All  Microsoft Corporation disclaimers apply.

DPing is a trademark of DameWare Development.

Microsoft Windows is a registered trademark of Microsoft Corporation.

Microsoft Windows Scripting Host is a registered trademark of Microsoft Corporation.


Displays Properties
Properties

All the properties are listed below. Properties that apply only to

DPing, or require special consideration when used with it,

are underlined. They are documented in this help file. See the

Visual Basic Language Reference or online Help for

documentation of the remaining properties.

(About)	(Name)
Continuous	DragIcon
DragMode	Height
HelpContextID	HostName
Index	IPAddress
IsRunning	Left
PacketSize	PingCount
ResolveAddress	ScrollBar
TabIndex	TabStop
Tag	Timeout
ToolTipText	Top
TTL	UseWindow
Visible	WhatsThisHelpID
Width


Display the DPing About box
(About) Property

Properties	Methods	Events

Description

The (About) property will invoke the DameWare DPing About box dialog.  This dialog is used to display the control’s registration information.

Syntax

DPingCtl1.AboutBox

Notes

The About box dialog will be displayed in the Windows environment until the control is registered with the license file (DPing.lic), or the Web environment with the license file (DPing.lpk).


Ping the specified computer until interrupted.
Continuous Property

Properties	Methods	Events

Description

The Continous property will ping the specified computer until interrupted.

Syntax

DPingCtl1.Continuous [ = {False | True}]

Data Type

Boolean

Example

Private Sub Command1_Click()

DPingCtl1.Continuous = True

End Sub

See Also

PingCount


Specify the HostName to use for the ping call.
HostName Property

Properties	Methods	Events

Description

Specifies the HostName to be used with the DPing call.

Syntax

DPingCtl1.HostName = “microsoft.com”

Data Type

String

Example

Private Sub Form_Load()

DPingCtl1.HostName = “microsoft.com”

DPingCtl1.Ping DPingCtl1.HostName

End Sub

See Also

IPAddress


Specify the IP Address to use for the ping call.
IP Address Property

Properties	Methods	Events

Description

Specifies the IP Address to be used with the DPing call.

Syntax

DPingCtl1.IPAddress = "204.71.177.35"

Data Type

String

Example

Private Sub Form_Load()

DPingCtl1.IPAddress = "204.71.177.35"

DPingCtl1.Ping DPingCtl1.IPAddress

End Sub

See Also

HostName


Determine if DPing is currently running.
IsRunning Property

Properties	Methods	Events

Description

During your application’s execution, trap whether or not DPing is currently running.  This property is also used to stop the DPing execution.

Syntax

DPingCtl1.IsRunning [ = {False | True}]

Data Type

Boolean

Example

Private Sub Timer1_Timer()

DPingCtl1.IsRunning = False       ‘ stop execution of DPing

If DPingCtl1.IsRunning Then       ‘ determine is DPing is running

Shape1.FillColor = &HFF&

Command2.Enabled = True

Else

Shape1.FillColor = &HFF00&

Command2.Enabled = False

Command1.Enabled = True

End If

End Sub


Specify the PacketSize to be used with the ping call.
PacketSize Property

Properties	Methods	Events

Description

Specifies the amount of data specified by length of ECHO packets sent during the DPing call.  The default is 64 bytes; the maximum is 8192.

Syntax

DPingCtl1.PacketSize = 32

Data Type

Integer

Example

Private Sub Form_Load()

DPingCtl1.PacketSize = 32

End Sub


Specify the number of ECHO packets to send during the ping call.
PingCount Property

Properties	Methods	Events

Description

Specifies the number of ECHO packets to be sent during the DPing call.  The default is 4.

Syntax

DPingCtl1.PingCount = 3

Data Type

Integer

Example

Private Sub Form_Load()

DPingCtl1.PingCount = 3

End Sub

See Also

Continuous


If specified, ping will resolve IP address to the computer name.
ResolveAddress Property

Properties	Methods	Events

Description

Specifies whether to resolve IP Addresses to computer name, during the DPing call.

Syntax

DPingCtl1.ResolveAddress [ = {False | True}]

Data Type

Boolean

Example

Private Sub Form_Load()

DPingCtl1.ResolveAddress = False

End Sub

See Also

HostName

IPAddress


Specify to display a scrollbar when used with UseWindow property.
ScrollBar Property

Properties	Methods	Events

Description

DPing can be used in two different modes - one is as a hidden control object, and the other is as an edit box window.  When used as an edit box window, the scrollbar property specifies whether to display scroll bars around the list box.

Syntax

DPingCtl1.ScrollBar  [ = {False | True}]

Data Type

Boolean

Example

Private Sub Form_Load()

DPingCtl1.ScrollBar = False

End Sub

See Also

UseWindow


Specify a timeout interval in milliseconds.
Timeout Property

Properties	Methods	Events

Description

Specifies a timeout interval in milliseconds to be used during the DPing call.

Syntax

DPingCtl1.Timeout = 1000

Data Type

Long

Example

Private Sub Form_Load()

DPingCtl1.Timeout = 1000

End Sub


Specify the Time to Live value.
TTL Property

Properties	Methods	Events

Description

Specifies the Time to Live field during the DPing call, to the value entered.

Syntax

DPingCtl1.TTL = 60

Data Type

Long

Example

Private Sub Form_Load()

DPingCtl1.TTL = 60

End Sub


Specify to use the DPing component with a display window.
UseWindow Property

Properties	Methods	Events

Description

DPing can be used in two different modes - one is as a hidden control object, and the other is as an edit box window.  This property is used to specify which mode to use.  When set to 1-True, DPing will use the edit box window mode.  When set to 0-False, DPing will use the hidden control object mode.

Notes

Please refer to the DPingS sample routine for an example using the list box window.

Syntax

DPingCtl1.UseWindow  [ = {False | True}]

Data Type

Boolean

Example

Private Sub Form_Load()

DPingCtl1.UseWindow = False

End Sub

See Also

ScrollBar


Displays Methods
Methods

All of the methods are listed below. Methods that apply only to

DPing, or require special consideration when used

with it, are underlined. They are documented in this help file.

See the Visual Basic Language Reference or online Help for

documentation of the remaining events.

Ping


Initiate a ping call with DPing using the options specified.
Ping Method

Properties	Methods	Events

Description

Initiate a ping call with DPing using the options specified.

Syntax

DPingCtl1.Ping Text6.Text

Data Type

String

Example

Private Sub Command1_Click()

DPingCtl1.ResolveAddress = True

DPingCtl1.Continuous = Check1.Value

DPingCtl1.PingCount = CLng(Text2.Text)

DPingCtl1.PacketSize = CLng(Text3.Text)

DPingCtl1.TTL = CLng(Text5.Text)

DPingCtl1.Timeout = CLng(Text4.Text)

DPingCtl1.Ping Text6.Text

End Sub


Displays Events
Events

All the events are listed below. Events that apply only to

DPing, or require special consideration when used

with it, are underlined. They are documented in this help file.

See the Visual Basic Language Reference or online Help for

documentation of the remaining events.

DragDrop

DragOver

GotFocus

LostFocus

OnPing

OnPingError

OnPingStr


Trap the values returned by DPing during a call.
OnPing Event

Properties	Methods	Events

Description

Trap the values returned by DPing during a call.

Data Type

String,Long,Long,Long

Example

Private Sub DPingCtl1_OnPing(ByVal strIpAddress As String, ByVal lBytes As Long, ByVal lTime As Long, ByVal lTTL As Long)

If lTime < 10 Then

StrTime$ = " time<10"

Else

StrTime$ = " time=" + LTrim(Str(lTime))

End If

If lBytes = -1 Then

Text1.Text = Text1.Text + "Request timed out." + Chr(13) + Chr(10)

Else

Text1.Text = Text1.Text + "Reply from " + strIpAddress + ": bytes=" + LTrim(Str(lBytes)) + StrTime$ + " TTL=" + LTrim(Str(lTTL)) + Chr(13) + Chr(10)

End If

Text1.SelStart = Len(Text1.Text)

Text1.SelLength = 0

End Sub

See Also

OnPingError

OnPingStr


Trap the error string returned by DPing during a call.
OnPingError Event

Properties	Methods	Events

Description

Trap the error code and error string returned by DPing during a call if an error occurs.

Data Type

String,Long

Example

Private Sub DPingCtl1_OnPingError(ByVal strError As String, ByVal lError As Long)

Text1.Text = Text1.Text + strError

Text1.SelStart = Len(Text1.Text)

Text1.SelLength = 0

End Sub

See Also

OnPing

OnPingStr


Trap the entire string returned by DPing during a call.
OnPingStr Event

Properties	Methods	Events

Description

Trap the string returned by DPing during a call.  This string contains the data returned from the DPing call, in a pre-formatted state - example: ("Pinging yahoo.com [204.71.177.35] with 32 bytes of data:").

Data Type

String

Example

Private Sub DPingCtl1_OnPingStr(ByVal strPing As String)

If Check3.Value = 1 Then

Text1.Text = Text1.Text + strPing

Text1.SelStart = Len(Text1.Text)

Text1.SelLength = 0

End If

End Sub

See Also

OnPing

OnPingError